<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle['Lists.EditNote.Title']}"></h:outputText>
        </ui:define>
        <ui:define name="menu">
            <div class="block_menu">
                <h:form>
                    <div class="block_menu_left">
                        <h:commandLink action="/index" value="#{bundle['Menu.Main']}"/>
                    </div>
                    <div class="block_menu_left_action">
                        <h:commandLink action="/notes/List" value="#{bundle['Menu.Notes']}"/>
                    </div>
                    
                    <div class="block_menu_right">
                        <h:commandLink action="#{userManagerController.logout()}" value="#{bundle['Menu.Logout']}"/>
                    </div>

                    <div class="block_menu_right">
                            <h:commandLink action="/profile/View" value="Hello #{userManagerController.getAuthenticatedUserName()}"/>
                    </div>                   
                    <h:panelGroup rendered="#{userManagerController.isRoleAdmin() == 1}">
                        <div class="block_menu_left">
                            <h:commandLink action="/users/List" value="#{bundle['Menu.UsersManagement']}"/>
                        </div>
                    </h:panelGroup>
                </h:form>
            </div>
        </ui:define>
        <ui:define name="line">
            <h:outputText value=""/>
        </ui:define>
        <ui:define name="body">
            <h:messages errorClass="error" infoClass="info" />
            <center>

                <h:form>
                    
                    <h:panelGrid columns="2" columnClasses="first_list,second_list" >

                        <h:outputLabel id="name"
                            style="width: 20px; text-align: center; 
                            height: 30px; font: 16pt 'Segoe WP'; 
                            color: #707070;"  
                            value="Expires date: "/>
 
                        <p:calendar value="#{noteController.expiresDate}" 
                                        selectListener="#{noteController.handleDateSelect}">
                        </p:calendar>
                    </h:panelGrid>
                    
                <h:panelGrid style="width: 70%;">
                    
                    <h:outputLabel value="" for="name" />
                    <h:inputTextarea rows="15" cols="100" id="description" 
                                     value="#{noteController.textDescription}" 
                                     title="" 
                                     
                            style="padding: 15px; font: 12pt 'Segoe WP'; color: #505050;
                        background-color: #ffffff; border: 2px solid #707070;"/>

                </h:panelGrid>
                    
                    
                    


                                        
                <h:panelGrid style="width: 70%;">
                <h:commandButton type="submit" style="width: 100%; height: 45px; font: 16pt 'Segoe WP'; 
                                         color: #505050; background-color: #f0f0f0; border: 2px solid #505050;" 
                                 value="#{bundle['Notes.description.Save']}"
                                 action="#{noteController.saveDescription()}"/>
                </h:panelGrid>
                    
    
            </h:form>
            </center>
        </ui:define>
    </ui:composition>

</html>
    